
//页面跳转
function skip_to(url,data) {
    location.href=url+data;
}

//数据请求
function get_hot_post() {
    return getData(POST_HOT,"");
}
function get_user_info(id) {
    return getData(USER_INFO,id);
}
function get_post_info(id) {
    return getData(POST_INFO,id);
}
function get_post_status_ok_ids() {
    return getData(POST_STATUS_OK_IDS,'');
}
function get_comment_info(id) {
    return getData(COMMENT_INFO,id)
}
function get_post_recy(id) {
    return getData(POST_RECY,id);
}

function get_user_followers(id) {
    return getData(USER_FOLLOWERS,id);
}

function get_user_post_today_num(id) {
    return getData(USER_POST_TODAY_NUM,id);
}
function get_user_post_total_num(id) {
    return getData(USER_POST_TOTAL_NUM,id);
}
function get_user_post_residue_num(id) {
    return getData(USER_POST_RESIDUE_NUM,id);
}
function get_collection_users(id) {
    return getData(COLLECTION_USERS,id);
}
function get_collection_forums(id) {
    return getData(COLLECTION_FORUMS,id);
}
function get_collection_posts(id) {
    return getData(COLLECTION_POSTS,id);
}

function get_forum_list() {
    return getData(FORUM_LIST,'')
}


function get_post_share_url(data) {
    return getData(POST_SHARE,data);
}
function get_collection_forum_uids(id) {
    return getData(COLLECTION_FORUM_UIDS,id);
}
function get_post_likes_uids(data) {
    return getData(POST_LIKES_UIDS,data)
}
function get_post_collection_uids(data) {
    return getData(POST_COLLECTION_UIDS,data);
}
function get_message_likes(id) {
    return getData(MESSAGE_LIKES,id)
}
function get_message_collection(id) {
    return getData(MESSAGE_COLLECTION,id)
}
function get_message_comment(id) {
    return getData(MESSAGE_COMMENT,id)
}
function get_notice_new() {
    return getData(NOTICE_NEW,'')
}
function get_config(data) {
    return getData(CONFIG,data)
}


function collection_user(data) {
    return putData(COLLECTION_USER,data);
}
function collection_forum(data) {
    return putData(COLLECTION_FORUM,data);
}
function collection_post(data) {
    return putData(COLLECTION_POST,data);
}

function report_post(data) {
    return putData(REPORT_POST,data)
}

function report_user(data) {
    return putData(REPORT_USER,data)
}

function is_reported_post(id) {
    return getData(REPORT_POST_UIDS,id);
}
function is_reported_user(id) {
    return getData(REPORT_USER_UIDS,id)
}

function comment_add(data) {
    return putData(COMMENT_ADD,data)
}
function likes_add(data) {
    return putData(LIKES_ADD,data);
}
function post_add(data) {
    return postData(POST_ADD,data);
}


function update_nickname(data) {
    return putData(UPDATE_NICKNAME,data);
}
function update_password(data) {
    return putData(UPDATE_PASSWORD,data);
}
function update_password_email(data) {
    return postData(UPDATE_PASSWORD_EMAIL,data);
}

function update_icon(data) {
    return putData(UPDATE_ICON,data);
}

function update_post_status(data) {
    return putData(UPDATE_POST_STATUS,data);
}
function update_message_likes_status(id) {
    return putData(MESSAGE_LIKES_UPDATE_STATUS,id)
}

function update_message_comment_status(id) {
    return putData(MESSAGE_COMMENT_UPDATE_STATUS,id)
}
function update_message_collection_status(id) {
    return putData(MESSAGE_COLLECTION_UPDATE_STATUS,id)
}

function update_score(data) {
    return putData(SCORE,data)
}


function del_post(id) {
    return deleteData(POST_DEL,id)
}
function del_collection(id) {
    return deleteData(COLLECTION_DEL,id);
}
function del_collection_forum(data) {
    return deleteData(COLLECTION_FORUM_DEL,data);
}
function del_collection_post(data) {
    return deleteData(COLLECTION_POST_DEL,data);
}
function del_collection_user(data) {
    return deleteData(COLLECTION_USER_DEL,data);
}
function del_likes(data) {
    return deleteData(LIKES_DEL,data);
}


function login(data) {
    return postData(USER_LOGIN,data);
}
function logout() {
    return getData(USER_LOGOUT,"");
}
function send_code(data) {
    return getData(SEND_CODE,data);
}

function send_code_p(data) {
    return getData(SEND_CODE_P,data);
}
function check_code(data) {
    return postData(CHECK_CODE, data);;
}
function register(data) {
    return postData(USER_REGISTER, data);
}